package com.celesea.framework.jwt;

import com.celesea.framework.authority.AuthorityPrincipal;

import java.util.concurrent.TimeUnit;

/**
 * @author JackYuan
 * @create 2017-11-22 20:28
 */
public interface JwtUserDetailService {
    /**
     * 加载用户信息
     *
     * @param sessionId
     * @return
     */
    AuthorityPrincipal loadUserDetails(String sessionId);

    /**
     * 更新用户的有效期
     *
     * @param loginSessionId
     * @param maxAge
     * @param seconds
     */
    void updateExpire(String loginSessionId, Integer maxAge, TimeUnit seconds);
}
